<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加</title>
    <#assign base=request.contextPath />
    <#setting  number_format="0.##"/>
    <base id="base" href="${base}">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${base}/layui-v2.5.7/layui/css/layui.css" media="all">
<#--    <link rel="stylesheet" href="${base}/layui-v2.5.7/layui/css/style.css" media="all">-->
    <script src="${base}/js/jquery-1.8.3.min.js?t=1"></script>
    <script src="${base}/layui-v2.5.7/layui/layui.js?t=1"></script>
    <script>
        var base =  "${base}";
    </script>
</head>
<body>
<br>
<form class="layui-form " action="">

                <div class="layui-form-item">
                    <label class="layui-form-label">账户</label>
                    <div class="layui-input-block">
                        <input type="text" id="account" name="account"   autocomplete="off" placeholder="请输入账户"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">密码</label>
                    <div class="layui-input-block">
                        <input type="text" id="passWord" name="passWord"   autocomplete="off" placeholder="请输入密码"
                               class="layui-input">
                    </div>
                </div>
<#--    <div style="float: right;margin-right: 5%">-->
<#--        <button type="button" class="layui-btn layui-btn-danger" onclick="saveButton()">保存</button>-->
<#--        <button type="button" class="layui-btn" style="background: #9F9F9F" onclick="window.history.back(-1);">返回</button>-->
<#--    </div>-->
</form>

<script>
    layui.use(['form', 'layer', 'layedit', 'laydate'], function() {
        var form = layui.form
            , layer = layui.layer
            , layedit = layui.layedit
            , laydate = layui.laydate;
    });
        function callbackdata() {
                var jsonDate = {
                                    account:$("#account").val(),
                                    passWord:$("#passWord").val()
                }
                return jsonDate;
        }
    //添加
    // function saveButton() {
    //     layui.layer.msg("正在提交添加信息...", {icon: 7, time: 10000, shade: [0.8, '#000', true]}); //添加laoding,0-2两种方式
    //
    //         if ($("#account").val() == "") {
    //             layui.layer.msg("账户不能为空", {icon: 5, time: 1000, shade: [0.6, '#000', true]});
    //             return;
    //         }
    //         if ($("#passWord").val() == "") {
    //             layui.layer.msg("密码不能为空", {icon: 5, time: 1000, shade: [0.6, '#000', true]});
    //             return;
    //         }
    //     var jsonDate = {
    //                         account:$("#account").val(),
    //                         passWord:$("#passWord").val()
    //     }
    //     $.ajax({
    //         type: "POST",
    //         contentType: "application/json;charset=UTF-8",
    //         url: base+"/admin/user/saveOrUpdateUser",
    //         data: JSON.stringify(jsonDate),
    //         success: function (data) {
    //             if (data.code === 200) {
    //                 setTimeout(function () {
    //                     layui.layer.closeAll();
    //                     // window.location.href = base+"/index/user.html"
    //                 }, 1000)
    //             } else {
    //                 layui.layer.msg(data.msg, {icon: 5, time: 1000, shade: [0.6, '#000', true]});
    //             }
    //         }
    //     });
    // }
</script>
</body>
</html>